home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 March
/
PCWorld_2007-03_cd.bin
/
komunikace
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Energy Equivalents.sd
< prev
next >
Wrap
INI File
|
2006-09-13
|
7KB
|
225 lines
[SUBJECT]
Description=Converts bewteen different units of energy
ImageIndex=-1
Folder=Mathematics
[BODY_TEXT]
;<!-- Cut-N-Paste JavaScript from ISN Toolbox
;Copyright 1996, Infohiway Server Network. Restricted use is hereby
;granted (both personal and commercial use OK so long as this code is
;not *directly* sold), providing this notice is buried somewhere deep
;in your HTML document. A link to http://www.infohiway.com is always
;appreciated, but is absolutely and positively not necessary. :-) -->
;<script language="JavaScript">
;
;<!-- Hide JavaScript from Java-Impaired Browsers
;
;function initArray() {
; this.length = initArray.arguments.length;
; for (var i = 0; i < this.length; i++) {
; this[i] = initArray.arguments[i];
;
; }
;
; }
;
;/* Please don't ask about this work-around. It works... We're sure arrays
;
; will be better supported soon. */
;
;var isn10 = new initArray("4b","5b","8b","8b");
;
;isn10[0] = "~01~10.10197~20.7376~32.778e-7~43.777e-7~53.725e-7~60.009869~70.0002388~80.0009478~9";
;
;isn10[1] = "~09.80665~11~27.233~32.724e-6~43.7037e-6~53.653e-6~60.09678~70.002342~80.009295~9";
;
;isn10[2] = "~01.356~10.1383~21~33.766e-7~45.1206e-7~55.0505e-7~60.01338~70.0003238~80.001285~9";
;
;isn10[3] = "~03.6e6~13.671e5~22.655e6~31~41.3596~51.341~635528~7859.9~83412~9";
;
;isn10[4] = "~02.648e6~12.7e5~21.9529e6~30.7355~41~50.9863~626131~7632.4~82510~9";
;
;isn10[5] = "~02.6845e6~12.7375e5~21.98e6~30.7457~41.0139~51~626493~7641.2~82544~9";
;
;isn10[6] = "~0101.333~110.333~274.74~32.815e-5~43.827e-5~53.775e-5~61~70.0242~80.09604~9";
;
;isn10[7] = "~04187~1426.9~23088~30.001163~40.001581~50.001560~641.32~71~83.968~9";
;
;isn10[8] = "~01055~1107.6~2778.2~32.931e-4~43.985e-4~53.93e-4~610.41~70.252~81~9";
;
;
;
;
;
;function eneCon() {
;
; // First, get the variables checked by the user
;
; for (var i = 0; i < 9; i++) {
;
; if (document.isnform10.enei[i].checked) {
;
; enei = i;
;
; eneinm = document.isnform10.enei[i].value;
;
; }
;
; }
;
; for (var i = 0; i < 9; i++) {
;
; if (document.isnform10.eneo[i].checked) {
;
; eneo = i;
;
; eneonm = document.isnform10.eneo[i].value;
;
; }
;
; }
;
; // Now grab the numeric input by user and parse to be sure numeric
;
; useri = document.isnform10.eneinp.value;
;
; if (useri == 0) {
;
; useri = 1;
;
; document.isnform10.eneinp.value = useri;
;
; }
;
; mulstr = isn10[enei];
;
; picker = "~" + eneo;
;
; ps = mulstr.indexOf(picker);
;
; eneo++;
;
; picker = "~" + eneo;
;
; ps1 = mulstr.indexOf(picker);
;
; mulstr = mulstr.substring((ps + 2),ps1);
;
; ps = (useri * mulstr);
;
; picker = "";
;
; picker += ps;
;
; ps1 = picker.indexOf(".");
;
; if (ps1 > -1) {
;
; // Correct for binary/floating point conversion error
;
; ps = ps + .000001;
;
; picker = "";
;
; picker += ps;
;
; ps2 = picker.indexOf("e");
;
; if (ps2 < 0) {
;
; picker = picker.substring(0,(ps1 + 6));
;
; }
;
; if (ps2 == 0 || ps2 > 0) {
;
; ps3 = picker.indexOf("00000");
;
; if (ps3 > 0) {
;
; picker = picker.substring(0,ps3 + 1) + picker.substring(ps2,picker.length);
;
; }
;
; }
;
; }
;
; picker = useri + " " + eneinm + " = " + picker + " " + eneonm;
;
; document.isnform10.eneout.value = picker;
;
; }
;
;// End Hiding -->
;
;
;
;</script>
;<form name="isnform10">
;<table border="1" width="486" summary="">
;
;<tr><td colspan="10" align="center"><font color="blue"><b>`Caption`</b></FONT></td></tr>
;
;<tr><td colspan="10" valign="top"><font size="1"><b>First, type the number you wish converted here: </b>
;
;<input type="text" name="eneinp" size="30" value="" onChange="eneCon();"><br><b>Then, click radio buttons for desired conversion:</B></font></td></tr>
;
;<tr><td align="center"><font color="red" size="1"><b>Fm:</b></font></td>
;
;<td align="center" valign="top"><font size="1">Joules<br><input type="radio" name="enei" value="Joules" checked onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Kg-meters<br><input type="radio" name="enei" value="Kg-meters" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Ft-lbs<br><input type="radio" name="enei" value="Ft-lbs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Kw-hrs<br><input type="radio" name="enei" value="Kw-hrs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Metric Hp-hrs<br><input type="radio" name="enei" value="Metric Hp-hrs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">US Hp-hrs<br><input type="radio" name="enei" value="US Hp-hrs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Liter-atm<br><input type="radio" name="enei" value="Liter-atm" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">K-cal<br><input type="radio" name="enei" value="K-cal" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Btu<br><input type="radio" name="enei" value="Btu" onClick = ""></FONT></td></tr>
;
;<tr><td align="center"><font color="red" size="1"><b>To:</b></FONT></td>
;
;<td align="center" valign="top"><font size="1">Joules<br><input type="radio" name="eneo" value="Joules" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Kg-meters<br><input type="radio" name="eneo" value="Kg-meters" checked onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Ft-lbs<br><input type="radio" name="eneo" value="Ft-lbs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Kw-hrs<br><input type="radio" name="eneo" value="Kw-hrs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Metric Hp-hrs<br><input type="radio" name="eneo" value="Metric Hp-hrs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">US Hp-hrs<br><input type="radio" name="eneo" value="US Hp-hrs" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Liter-atm<br><input type="radio" name="eneo" value="Liter-atm" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">K-cal<br><input type="radio" name="eneo" value="K-cal" onClick = ""></FONT></td>
;
;<td align="center" valign="top"><font size="1">Btu<br><input type="radio" name="eneo" value="Btu" onClick = ""></FONT></td></tr>
;
;<tr><td colspan="10" align="center" valign="top"><font size="1"><input type="button" value=" Click for Conversion " onClick="eneCon();">
;<input type="reset" value=" Reset Values "><br><input type="text" name="eneout" size="60" value="" onClick="eneCon();">
;
;</font></td></tr>
;
;</table></form>
;
;<p>
;
[`Caption`]
Kind=S
Value=Energy/Work Equivalents